<template>
	<div class="child">
		<h1>我是Child组件</h1>
		<input type="checkbox" :checked="agree" @click="handleAgree">同意协议
	</div>
</template>

<script>
	export default {
		name:'Child',
		props:['agree','getCheckedStatus'],
		methods: {
			handleAgree(e){
				this.getCheckedStatus(e.target.checked)
			}
		},
	}	
</script>

<style>
	.child{
		background-color: skyblue;
		padding: 20px;
	}
</style>